﻿<Serializable()> _
Public Class EedificioManz

#Region "           Atributos                       "
    Private _idProyecto As Int32
    Private _idEtapa As Int32
    Private _idEdiMzn As Int32
    Private _nomEdiMzn As String
    Private _tpoConstruccion As EtpoConstruccion
    Private _areaTerreno As Decimal
    Private _nroUnidInmob As Int32
    Private _nroPisos As Int32
    Private _fechInicio As String
    Private _fechEntrega As String
    Private _observaciones As String
    Private _ascensorDirecto As Int16
    Private _idEstadoEdiMzn As Int32
    Private _estadoEdiMzn As EestadoEdiMzn
    Private _estado As String
    Private _descEstado As String
    Private _idUsuario As Int32
#End Region

#Region "           Propiedades                     "
    Public Property idProyecto() As Int32
        Get
            Return _idProyecto
        End Get
        Set(ByVal value As Int32)
            _idProyecto = value
        End Set
    End Property
    Public Property idEtapa() As Int32
        Get
            Return _idEtapa
        End Get
        Set(ByVal value As Int32)
            _idEtapa = value
        End Set
    End Property
    Public Property idEdiMzn() As Int32
        Get
            Return _idEdiMzn
        End Get
        Set(ByVal value As Int32)
            _idEdiMzn = value
        End Set
    End Property
    Public Property nomEdiMzn() As String
        Get
            Return _nomEdiMzn
        End Get
        Set(ByVal value As String)
            _nomEdiMzn = value
        End Set
    End Property
    Public Property EtpoConstruccion() As EtpoConstruccion
        Get
            Return _tpoConstruccion
        End Get
        Set(ByVal value As EtpoConstruccion)
            _tpoConstruccion = value
        End Set
    End Property
    Public Property areaTerreno() As Decimal
        Get
            Return _areaTerreno
        End Get
        Set(ByVal value As Decimal)
            _areaTerreno = value
        End Set
    End Property
    Public Property nroUnidInmob() As Int32
        Get
            Return _nroUnidInmob
        End Get
        Set(ByVal value As Int32)
            _nroUnidInmob = value
        End Set
    End Property
    Public Property nroPisos() As Int32
        Get
            Return _nroPisos
        End Get
        Set(ByVal value As Int32)
            _nroPisos = value
        End Set
    End Property
    Public Property fechInicio() As String
        Get
            Return _fechInicio
        End Get
        Set(ByVal value As String)
            _fechInicio = value
        End Set
    End Property
    Public Property fechEntrega() As String
        Get
            Return _fechEntrega
        End Get
        Set(ByVal value As String)
            _fechEntrega = value
        End Set
    End Property
    Public Property observaciones() As String
        Get
            Return _observaciones
        End Get
        Set(ByVal value As String)
            _observaciones = value
        End Set
    End Property
    Public Property ascensorDirecto() As Int16
        Get
            Return _ascensorDirecto
        End Get
        Set(ByVal value As Int16)
            _ascensorDirecto = value
        End Set
    End Property
    Public Property idEstadoEdiMzn() As String
        Get
            Return _idEstadoEdiMzn
        End Get
        Set(ByVal value As String)
            _idEstadoEdiMzn = value
        End Set
    End Property
    Public Property EestadoEdiMzn() As EestadoEdiMzn
        Get
            Return _estadoEdiMzn
        End Get
        Set(ByVal value As EestadoEdiMzn)
            _estadoEdiMzn = value
        End Set
    End Property
    Public Property estado() As String
        Get
            Return _estado
        End Get
        Set(ByVal value As String)
            _estado = value
        End Set
    End Property
    Public Property descEstado() As String
        Get
            Return _descEstado
        End Get
        Set(ByVal value As String)
            _descEstado = value
        End Set
    End Property
    Public Property idUsuario() As Int32
        Get
            Return _idUsuario
        End Get
        Set(ByVal value As Int32)
            _idUsuario = value
        End Set
    End Property
#End Region

#Region "           Propiedades Avanzadas           "
    Public ReadOnly Property NombreBloqueInmueble() As String
        Get
            Return nomEdiMzn & " - " & nroUnidInmob
        End Get
    End Property

#End Region

#Region "           Contructores                    "
    Public Sub New()

    End Sub
    Public Sub New(ByVal idEdiMzn As Int32, ByVal nomEdiMzn As String)
        Me.idEdiMzn = idEdiMzn
        Me.nomEdiMzn = nomEdiMzn
    End Sub
    Public Sub New(ByVal idProyecto As Int32, ByVal idEtapa As Int32, ByVal idEdiMzn As Int32, ByVal nomEdiMzn As String, _
                   ByVal idTpoConstruccion As Int32, ByVal descTpoConstruccion As String, ByVal areaTerreno As Decimal, ByVal nroUnidInmob As Int32, _
                   ByVal nroPisos As Int32, ByVal fechInicio As String, ByVal fechEntrega As String, ByVal observaciones As String, _
                   ByVal ascensorDirecto As Int16, ByVal estado As String)
        Me.idProyecto = idProyecto
        Me.idEtapa = idEtapa
        Me.idEdiMzn = idEdiMzn
        Me.nomEdiMzn = nomEdiMzn
        _tpoConstruccion = New EtpoConstruccion(idTpoConstruccion, descTpoConstruccion)
        Me.areaTerreno = areaTerreno
        Me.nroUnidInmob = nroUnidInmob
        Me.nroPisos = nroPisos
        Me.fechInicio = fechInicio
        Me.fechEntrega = fechEntrega
        Me.observaciones = observaciones
        Me.ascensorDirecto = ascensorDirecto
        Me.estado = estado
        Me.descEstado = IIf(estado = 1, "HABILITADO", "DESHABILITADO")
    End Sub
    Public Sub New(ByVal idProyecto As Int32, ByVal idEtapa As Int32, ByVal idEdiMzn As Int32, ByVal nomEdiMzn As String, _
                   ByVal idTpoConstruccion As Int32, ByVal descTpoConstruccion As String, ByVal areaTerreno As Decimal, ByVal nroUnidInmob As Int32, _
                   ByVal nroPisos As Int32, ByVal fechInicio As String, ByVal fechEntrega As String, ByVal observaciones As String, _
                   ByVal ascensorDirecto As Int16, ByVal idEstadoEdiMzn As Int32, ByVal descEstadoEdiMzn As String, ByVal estado As String)
        Me.idProyecto = idProyecto
        Me.idEtapa = idEtapa
        Me.idEdiMzn = idEdiMzn
        Me.nomEdiMzn = nomEdiMzn
        _tpoConstruccion = New EtpoConstruccion(idTpoConstruccion, descTpoConstruccion)
        Me.areaTerreno = areaTerreno
        Me.nroUnidInmob = nroUnidInmob
        Me.nroPisos = nroPisos
        Me.fechInicio = fechInicio
        Me.fechEntrega = fechEntrega
        Me.observaciones = observaciones
        Me.ascensorDirecto = ascensorDirecto
        'Me.idEstadoEdiMzn = idEstadoEdiMzn
        _estadoEdiMzn = New EestadoEdiMzn(idEstadoEdiMzn, descEstadoEdiMzn)
        Me.estado = estado
        Me.descEstado = IIf(estado = 1, "HABILITADO", "DESHABILITADO")
    End Sub
#End Region

End Class
